package org.zfes.snowier.cloud.zbss.cms.pub.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.zfes.snowier.cloud.zbss.cms.pub.dao.PubAutoidMapper;
import org.zfes.snowier.cloud.zbss.cms.pub.model.PubAutoid;
import org.zfes.snowier.cloud.zbss.cms.pub.service.IPubAutoidService;
import org.springframework.beans.factory.annotation.Autowired;
@Service
public class PubAutoidServiceImpl implements IPubAutoidService{

	@Autowired
	private PubAutoidMapper pubAutoidMapper;
	
	@Transactional(rollbackFor=Exception.class,readOnly=false)
	@Override
	public Long nextAutoId(){
		PubAutoid pubAutoid=new PubAutoid("a");
		pubAutoidMapper.replaceForNextId(pubAutoid);
 		return pubAutoid.getId();
 	}
	

	
}